package com.rongzhe.house.house.dao;

import com.rongzhe.house.house.criteria.HouseCriteria;
import com.rongzhe.house.house.entity.HouseBase;
import com.rongzhe.house.house.entity.HouseDetail;
import com.rongzhe.house.house.entity.HouseOverview;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
@Mapper
public interface HouseBaseMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(HouseBase record);

    int insertSelective(HouseBase record);

    HouseBase selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(HouseBase record);

    int updateByPrimaryKey(HouseBase record);

    List<HouseOverview> selectHouseByCriteria(HouseCriteria houseCriteria);


    List<HouseOverview> selectExcellentHouse(String cityId);


    HouseDetail selectDetailById(Integer houseId);

    int countHouseByCriteria(HouseCriteria houseCriteria);

    List<HouseOverview> selectCollectionHouseByUid(@Param("uid") Integer uid, @Param("limit") Integer limit, @Param("offset") Integer offset);

    int countCollectionHouseByUid(@Param("uid") Integer uid);
}